package fr.ordre66.vlcs.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import fr.ordre66.vlcs.dao.IUserDao;
import fr.ordre66.vlcs.dto.User;

@Service("userManager")
public class UserManager implements IUserManager{

	@Autowired private IUserDao userDao;
	
	@Override
	@Transactional(readOnly = false)
	public void create(User user) {
		userDao.persist(user);
	}

	@Override
	@Transactional(readOnly = false)
	public User get(String login) {
		return userDao.get(login);
	}

	@Override
	@Transactional(readOnly = false)
	public List<User> getAll() {
		return userDao.getAll();
	}

	
}
